<?php /* Smarty version 2.6.31, created on 2018-03-27 13:13:34
         compiled from E:/xampp/htdocs/rbac/Admin/Tpl/Authority/setRole.html */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../Common/head_authority.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<body>
<div class="container-fluid">
    <div class="row" style="margin: 20px 0px;">
        <b>设置<?php echo $_GET['name']; ?>
权限</b>
        <a href="javascript:history.back();" style="float: right;">返回</a>
    </div>
    <div class="row" style="height: 35px;line-height:35px;margin-top: 5px;">
        <div class="col-sm-offset-1 col-md-offset-1 col-lg-offset-1 col-sm-5 col-md-5 col-lg-5">
            <input type="checkbox" id="checkAll" style="display: inline-block;vertical-align: middle;margin-bottom: 5px;margin-right: 10px;"/>
            <label style="line-height: 35px;margin-bottom: 0px;">全选</label>
        </div>
    </div>
    <form action="#" method="post">
        <?php $_from = ($this->_tpl_vars['firstMenu']); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['f']):
?>
        <div class="row" style="height: 35px;line-height:35px;margin-top: 25px;margin-bottom: 5px;">
            <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-2 col-sm-5 col-md-5 col-lg-5">
                <b style="line-height: 35px;margin-bottom: 0px;"><?php echo $this->_tpl_vars['f']['title']; ?>
</b>
            </div>
        </div>
            <?php $_from = ($this->_tpl_vars['secondMenu']); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['s']):
?>
                <?php if ($this->_tpl_vars['f']['id'] == $this->_tpl_vars['s']['parent_id']): ?>
                    <?php if (in_array ( $this->_tpl_vars['s']['id'] , $this->_tpl_vars['radata'] )): ?>
                    <div class="row" style="height: 35px;line-height:35px;margin-top: 5px;padding-left: 35px;">
                        <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-2 col-sm-5 col-md-5 col-lg-5">
                            <input type="checkbox" checked name="aid[]" value="<?php echo $this->_tpl_vars['s']['id']; ?>
" style="display: inline-block;vertical-align: middle;margin-bottom: 5px;margin-right: 10px;"/>
                            <label style="line-height: 35px;margin-bottom: 0px;"><?php echo $this->_tpl_vars['s']['title']; ?>
</label>
                        </div>
                    </div>
                    <?php else: ?>
                    <div class="row" style="height: 35px;line-height:35px;margin-top: 5px;padding-left: 35px;">
                        <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-2 col-sm-5 col-md-5 col-lg-5">
                            <input type="checkbox" name="aid[]" value="<?php echo $this->_tpl_vars['s']['id']; ?>
" style="display: inline-block;vertical-align: middle;margin-bottom: 5px;margin-right: 10px;"/>
                            <label style="line-height: 35px;margin-bottom: 0px;"><?php echo $this->_tpl_vars['s']['title']; ?>
</label>
                        </div>
                    </div>
                    <?php endif; ?>
                <?php endif; ?>
                <?php $_from = ($this->_tpl_vars['thirdMenu']); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['t']):
?>
                    <?php if ($this->_tpl_vars['s']['id'] == $this->_tpl_vars['t']['parent_id'] && $this->_tpl_vars['s']['parent_id'] == $this->_tpl_vars['f']['id']): ?>
                        <?php if (in_array ( $this->_tpl_vars['t']['id'] , $this->_tpl_vars['radata'] )): ?>
                        <div class="row" style="height: 35px;line-height:35px;margin-top: 5px;padding-left: 65px;">
                            <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-2 col-sm-5 col-md-5 col-lg-5">
                                <input type="checkbox" checked name="aid[]" value="<?php echo $this->_tpl_vars['t']['id']; ?>
" style="display: inline-block;vertical-align: middle;margin-bottom: 5px;margin-right: 10px;"/>
                                <label style="line-height: 35px;margin-bottom: 0px;"><?php echo $this->_tpl_vars['t']['title']; ?>
</label>
                            </div>
                        </div>
                        <?php else: ?>
                        <div class="row" style="height: 35px;line-height:35px;margin-top: 5px;padding-left: 65px;">
                            <div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-2 col-sm-5 col-md-5 col-lg-5">
                                <input type="checkbox" name="aid[]" value="<?php echo $this->_tpl_vars['t']['id']; ?>
" style="display: inline-block;vertical-align: middle;margin-bottom: 5px;margin-right: 10px;"/>
                                <label style="line-height: 35px;margin-bottom: 0px;"><?php echo $this->_tpl_vars['t']['title']; ?>
</label>
                            </div>
                        </div>
                        <?php endif; ?>
                    <?php endif; ?>
                <?php endforeach; endif; unset($_from); ?>
            <?php endforeach; endif; unset($_from); ?>
        <?php endforeach; endif; unset($_from); ?>
        <div class="row" style="height: 35px;line-height: 35px;margin-top: 15px;">
            <div class="col-sm-4 col-md-4 col-lg-4" style="text-align: right"></div>
            <div class="col-sm-3 col-md-3 col-lg-3">
                <button type="submit" id="aa" class="btn btn-primary pull-right">保存</button>
            </div>
        </div>
    </form>
<?php echo '
    <script>
        $("#checkAll").click(function(){
            if(this.checked){
                $(\'input:checkbox\').each(function(){
                    if(!this.checked){
                        $(this).attr(\'checked\', true);
                    }
                })
            }else{
                $(\'input:checkbox\').each(function(){
                    if(this.checked){
                        $(this).attr(\'checked\', false);
                    }
                })
            }
        })
        $("#aa").click(function(){
            $("[name=\'aid\']").each(function(){
                if(this.checked){
                    alert($(this).val());
                }
            })
        })
    </script>
'; ?>


</body>
</html>